﻿namespace Collaboris.Saf.Actions.Wss.Wrappers
{
    using System;

    using SharePoint.Wss.Attributes;
    using SharePoint.Wss.Entities;

    [Serializable]
    [CollaborisClass(
       Title = "WSS External Engine Wrapper",
       ReleaseStatus = ReleaseStatus.Stable,
       DisableDocumentation = false,
       ContactAuthorEmail = "Support@Collaboris.co.uk",
       Summary = "This class supports the ability to add one script for 'Do' and one script for 'Undo'.",
       Remarks = "Use this class when writing an action doesn't support 'Do' or 'Undo' natively.",
          ClassGuid = "{156E17A5-A7BA-4e1f-8A48-1BC341A7C667}"
    )  ]
    public class WSSExternalEngineWrapper<T> : WSSEntityBase // where T : ExternalEngine
    {
        private T doScriptScript;

        private T undoScript;

        [CollaborisProperty(
            Summary = "Optional. Defines an entity that will be passed during an Undo." ,
            Title = "Undo Script",
            Example = "${T}"
            )]
        public T UndoScript
        {
            get
            {
                return this.undoScript;
            }
            set
            {
                this.undoScript = value;
            }
        }

        [CollaborisProperty(
            Summary = "Optional. Defines an entity that will be passed during a Do.",
            Title = "Do Script",
            Example = "${T}"
            )]
        public T DoScript
        {
            get
            {
                return this.doScriptScript;
            }
            set
            {
                this.doScriptScript = value;
            }
        }
    }
}